package com.yonyou.pmclouds.milestone.mapper;

import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.milestone.entity.MilestoneRefVO;
import com.yonyou.pmclouds.milestone.entity.MilestoneVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MilestoneMapper extends BaseMapper<MilestoneVO> {

    MilestoneVO[] queryByIds(@Param("ids") List<String> ids);

    MilestoneVO[] queryByTenant(@Param("pkTenant") String pkTenant, @Param("enableStatus") Byte enableStatus,
                                @Param("keyword") String keyword);

    int countCode(@Param("code") String code, @Param("pkTenant") String pkTenant);

    int countName(@Param("name") String name, @Param("pkTenant") String pkTenant);

    MilestoneRefVO[] queryRefVOByTenant(@Param("pkTenant") String pkTenant, @Param("keyword") String keyword);

    MilestoneRefVO[] queryNameByIds(@Param("ids") String[] ids);

    List<MilestoneVO> queryByCodes(@Param("codes") String[] codes, @Param("pkTenant") String pkTenant);
}
